import { ConfigBase } from "./ConfigBase";

export class LevelConfig extends ConfigBase {
    private static _inst: LevelConfig;
    public static get inst(): LevelConfig {
        if (this._inst == null) {
            this._inst = new LevelConfig();


        }
        return this._inst;
    }

    public Datas: LevelData[] = null;

    public Find(id: number): LevelData {
        for (let i = 0; i < this.Datas.length; ++i) {
            let data = this.Datas[i];
            if(id == data.Id) {
                return data;
            }
        }
        return null;
    }
}

export class LevelData {
    public Id: number = 0;
    public Target: number = 0;
    public LevelPrefab : string = "";
}

